package com.cfuture08.eweb4j.mvc.config;

import java.util.ArrayList;
import java.util.List;

import com.cfuture08.eweb4j.mvc.config.bean.Field;
import com.cfuture08.eweb4j.mvc.config.bean.FormBean;
import com.cfuture08.eweb4j.mvc.config.bean.MVCConfigBean;
import com.cfuture08.eweb4j.mvc.config.bean.Param;
import com.cfuture08.eweb4j.mvc.config.bean.Result;
import com.cfuture08.eweb4j.mvc.config.bean.Validator;
/**
 * 创建MVC存取配置信息bean实例
 * @author cfuture.aw
 * @since v1.a.0
 *
 */
public class MVCConfigBeanCreator {
	public static MVCConfigBean getMVCBean() {
		MVCConfigBean mvcBean = null;
		mvcBean = new MVCConfigBean();
		List<Result> rlist = new ArrayList<Result>();
		Result result = new Result();
		rlist.add(result);
		mvcBean.setResult(rlist);
		
		List<FormBean> flist = new ArrayList<FormBean>();
		FormBean formBean = new FormBean();
		flist.add(formBean);
		mvcBean.setFormBean(flist);
		
		List<Validator> vlist = new ArrayList<Validator>();
		Validator validator = new Validator();
		List<Field> fieldList = new ArrayList<Field>();
		Field field = new Field();
		fieldList.add(field);
		validator.setField(fieldList);
		
		List<Param> paramList = new ArrayList<Param>();
		Param param = new Param();
		paramList.add(param);
		validator.setParam(paramList);
		
		vlist.add(validator);
		mvcBean.setValidator(vlist);
		
		return mvcBean;
	}
}
